import { apis } from './request'
import { getAction, deleteAction, putAction, postAction } from './method'

// **请求
// 更新用户密码
const editPassword = (params) => putAction(apis.editPassword, params)
// 获取所有的检查组
const getAllCheckGroups = (params) => getAction(apis.getAllCheckGroups, params)
// 获取所有的检查项
const getAllCheckItems = (params) => getAction(apis.getAllCheckItems, params)
//删除会员档案信息
const deleteMemberProfile = (params) => deleteAction(apis.deleteMemberProfile, params)
//编辑会员档案信息
const editMemberProfile = (params) => putAction(apis.editMemberProfile, params)
// 获取所有的角色
const getAllRoles = (params) => getAction(apis.getAllRoles, params)
// 编辑用户
const editUser = (params) => putAction(apis.editUser, params)
// 根据用户ID获取用户下所有的角色ID
const getRoleIdsByUserId = (params) => getAction(apis.getRoleIdsByUserId, params)
// 新增用户
const addUser = (params) => postAction(apis.addUser, params)
// 获取用户
const getUsers = (params) => getAction(apis.getUsers, params)
// 获取登录用户的菜单
const getUserMenus = (params) => getAction(apis.getUserMenus, params)
// 编辑角色
const editRole = (params) => putAction(apis.editRole, params)
// 根据角色id获取角色下所有的菜单ID
const getMenuIdsByRoleId = (params) => getAction(apis.getMenuIdsByRoleId, params)
// 添加角色
const addRole = (params) => postAction(apis.addRole, params)
// 查询角色
const getRoles = (params) => getAction(apis.getRoles, params)
// 查询菜单
const getMenus = (params) => getAction(apis.getMenus, params)
//新增会员档案信息
const addMemberProfile = (params) => postAction(apis.addMemberProfile, params)
//分页获取会员档案
const getMemberProfiles = (params) => getAction(apis.getMemberProfiles, params)
// 获取运营统计分析报告数据
const getReportBusiness = (params) => getAction(apis.getReportBusiness, params)
// 获取套餐统计分析报告数据
const getReportSetMeal = (params) => getAction(apis.getReportSetMeal, params)
// 获取会员统计分析报告数据
const getReportMember = (params) => getAction(apis.getReportMember, params)
// 取消预约（删除）
const deleteOrder = (params) => deleteAction(apis.deleteOrder, params)
// 将预约状态改为已到诊
const editOrderToVisited = (params) => putAction(apis.editOrderToVisited, params)
// 获取预约信息
const getOrders = (params) => getAction(apis.getOrders, params)
// 根据具体日期来更新预约设置
const editOrderSettingByDate = (params) => putAction(apis.editOrderSettingByDate, params)
// 批量上传预约设置
const uploadOrderSettings = (params) => postAction(apis.uploadOrderSettings,params)
// 判断Token是否有效
const isTokenEffective = (params) => getAction(apis.isToken, params)
// 根据年月份获取预约设置情况
const getOrderSettingsByYearMonth = (params) => getAction(apis.getOrderSettingsByYearMonth, params)
// 新增套餐
const addSetMeal = (params) => postAction(apis.addSetMeal, params)
// 获取套餐
const getSetMeal = (params) => getAction(apis.getSetMeals, params)
// 删除检查项
const deleteCheckItem = (params) => deleteAction(apis.deleteCheckItem, params)
// 新增检查组
const addCheckGroup = (params) => postAction(apis.addCheckGroup, params)
// 分页查询检查组
const getCheckGroups = (params) => getAction(apis.getCheckGroups, params)
// 新增检查项
const addCheckItem = (params) => postAction(apis.addCheckItem, params)
// 获取检查项的信息
const getCheckItems = (params) => getAction(apis.getCheckItems, params)
// 获取登录用户的信息
const getUserInfo = () => getAction(apis.getUserInfo)
// 登录请求
const login = (params) => postAction(apis.login, params)
// 以树结构获取所有的菜单
const getAllMenusToTree = (params) => getAction(apis.getAllMenusToTree, params)

// **暴露
export {
    editPassword,
    getAllCheckItems,
    getAllCheckGroups,
    deleteMemberProfile,
    editMemberProfile,
    getAllRoles,
    editUser,
    getRoleIdsByUserId,
    addUser,
    getUsers,
    getUserMenus,
    editRole,
    getMenuIdsByRoleId,
    addRole,
    getRoles,
    getMenus,
    getReportBusiness,
    getReportSetMeal,
    getReportMember,
    deleteOrder,
    editOrderToVisited,
    getOrders,
    editOrderSettingByDate,
    uploadOrderSettings,
    isTokenEffective,
    addMemberProfile,
    getOrderSettingsByYearMonth,
    addSetMeal,
    getSetMeal,
    deleteCheckItem,
    getMemberProfiles,
    addCheckGroup,
    getCheckGroups,
    addCheckItem,
    getCheckItems,
    getUserInfo,
    login,
    getAllMenusToTree,
}
